import Emberbox from "@/utils/mapbox/engine";
import { create } from "zustand";
type CounterState = {
  state: "Hold" | "SetDestination" | "SetPaths" | "Navigiting";
  [key: string]: any;
};
const states = ["Hold", "SetDestination", "SetPaths", "Navigiting"];
export const useEmberboxStore = create<CounterState>((set, get) => ({
  // 页面
  state: "Hold",
  setState: (e: "Hold" | "SetDestination" | "SetPaths" | "Navigiting") =>
    set((state: any) => ({ state: e })),
  // 底图
  emberbox: null,
  setEmberbox: (e: Emberbox) => set((state: any) => ({ emberbox: e })),
  //   increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
  //   removeAllBears: () => set({ bears: 0 }),

  // 楼层
  layers: [[]],
  setLayers: (e: []) => {
    set(() => ({ layers: e }));
  },

  // 下方的导航
  navs: [],
  setNavs: (e: any) =>
    set(() => {
      {
        navs: e;
      }
    }),
}));
